package typechecker.ast.term;

import typechecker.ast.type.TypeExpression;

public class Letrec extends Expression{
	private TermVariable var;
	private Expression exp;
	private TypeExpression type;
	
	
	public Letrec(TypeExpression type , TermVariable var, Expression exp) {
		this.type = type;
		this.var = var;
		this.exp = exp;
	}
	
	@Override
	public String preetyPrint() {
		String ret = "(letrec<" + type.preetyPrint() + ">" + var.preetyPrint() + " = \n" + exp.preetyPrint() + ")";
		return ret; 
	}
	
	public TermVariable getVar() {
		return var;
	}
	
	public TypeExpression getType() {
		return type;
	}
	
	public Expression getExp() {
		return exp;
	}
}
